<?php

abstract class Jf_Controller_Action_Frontend extends Jf_Controller_Action_Abstract {

    public function initViewScriptPath () {
        $appPath = Jf_Global::get ('directory');
        $scriptPath = $appPath . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'views';
        $this -> getView () -> setScriptPath ($scriptPath);
        if ($this -> getRequest () -> isGet () &&  ! $this -> getRequest () -> isXmlHttpRequest ()) {
            $layoutPath = $scriptPath . DIRECTORY_SEPARATOR . '_layouts';
            $this -> getPlugin ('layout') -> setLayoutPath ($layoutPath);
        }
    }

}

